<template>
  <div>
    父组件
    <hr>
    <Son :list="list" />
    <hr>
    <Son :list="list">
      <template slot-scope="scope">
        <p>本书的作者是：{{ scope.author }}</p>
        <p>本书的价格是：{{ scope.price }}</p>
        <p>本书的名字是：{{ scope.bookname }}</p>
      </template>
    </Son>

    <hr>
    <Son :list="list">
      <template slot-scope="scope">
        <img :src="scope.img">
        <p>名字：{{ scope.bookname }}</p>
        <p>作者：{{ scope.author }},价格{{ scope.price }}</p>
      </template>
    </Son>

    <!-- <Son2 :list="list" /> -->
  </div>
</template>
<script>
import Son from './son.vue'
// import Son2 from './son2.vue'
export default {
  components: { Son },
  data() {
    return {
      list: [{
        name: '数学之美 第三版',
        price: '46.70',
        author: '吴军',
        img: 'http://img3m2.ddimg.cn/18/30/28538352-1_x_5.jpg'
      },
      {
        name: '认知天性',
        price: '33.70',
        author: '彼得·布朗',
        img: 'http://img3m3.ddimg.cn/59/6/25350593-1_x_3.jpg'
      }]
    }
  }
}
</script>
